package aTurk2;

import java.io.File;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Random;

import aTurk.Parameters;

/**
 * 
 * @author avshalom
 * In this code I generate 7 random stores (using the parameters file)
 *
 */
public class GenerateSeven implements aTurk2.Parameters{

	
	public static void main(String[] args) throws IOException {
		Random randGen=new Random(System.currentTimeMillis());
		String strDirectoy ="servers/7";
		// Create servers directory
		(new File(strDirectoy)).mkdirs();
		  
		for(int i=0;i<PROBLEM_SIZE;++i){
			int k=i+1;
			String filename=strDirectoy+"/"+k+".csv";
			PrintWriter pw=new PrintWriter(filename);
			
			for(int j=0;j<7;++j){
				SimpleProblem prob=new SimpleProblem(j+1, randGen);
				pw.append(prob.toSpecialFormat());
				pw.append("\n");
			}
			pw.close();
		}
	}
}
